<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %> 
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>

<%@ page import="com.scalar.chiptrack.utils.ConfigManager"%>

<chiptrack:checkLogon sourcePage="/approverPo.do"/>

<HTML><HEAD><TITLE>Scalarsoft - ChipTrac</TITLE>

<%String chipTracContext = "/" + ConfigManager.getChipTracContext();%>

<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type=text/css rel=stylesheet>

<META content="MSHTML 5.50.4807.2300" name=GENERATOR></HEAD>
<BODY bgColor="#ffffff" leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">

<SCRIPT language="JavaScript">


    function submitPage(action)
    {
        if(action == 'APPROVE')
            document.approverPOForm.action.value = "ApprovePO";
        else if(action == 'REJECT')
            document.approverPOForm.action.value = "RejectPO";

        document.approverPOForm.submit();
    }

    // Added by Basha (07/31/2003)
    function showErrorReportPage()
    {
        newWindow = window.open ('<%=chipTracContext%>/reportProblem.do','reportProblem','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=no,scrollbars=no,width=750,height=400,resizable=no');
        newWindow.focus();
    }

</SCRIPT>

<!-- Top Header Start-->

<%@include file="/jsp/includes/header.jsp"  %>

<!-- Top Header End-->

<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
	<td width='180' valign='top' background='<%=chipTracContext%>/jsp/includes/images/left_red_bg.gif'>

<!-- Side Navigation start -->
	<%@include file="/jsp/finance/purchase_order_menu.jsp" %>

</TD>
<!-- end of the side navigations -->
<TD bgcolor="#ffffff">
<IMG height=9 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=8></TD>
<TD bgcolor="#ffffff"><IMG height=480 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=2></TD>
<TD valign="top" width="100%">

<IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/clear.gif" width=500 border=0>
<BR>
<!-- from here your body starts -->

<center><span class="NArialW">Purchase Order Entry</span></center>
<img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20>
<table border="0" width="90%" align=right>

<tr><td colspan=6><chiptrack:info styleClass="NArialL" /></td></tr>
<tr><td colspan=6><chiptrack:errors styleClass="NArialL" /></td></tr>

<tr><td>
  <table border="0" width="98%">
  <tr><td colspan=5><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>
  
  <html:form name="approverPOForm" action="/approvePo.do" method="post" type="com.scalar.chiptrack.finance.forms.ApproverPOForm">
  <nested:nest property="purchaseOrder">
  <tr>
    <td width="32%" align="left"><font class="NArialL">Purchase Order No</font></td>
    <td width="30%" align="left" class='bodytext'><nested:write property="purchaseOrderNumber" />
      </td>
    <td width="11%" align="left"></td>
    <td width="22%" align="left"><font class="NArialL">Change No</font></td>
    <td width="36%" align="left" class='bodytext'><nested:write property="changeOrderNumber"/>
      </td>
  </tr>
  <tr>
    <td width="32%" align="left"><font class="NArialL">Vendor Name</font></td>
    <td width="30%" align="left" class='bodytext'>
    	<nested:write property="vendorName" />
    </td>
    <td width="11%" align="left"></td>
    <td width="22%" align="left"></td>
    <td width="36%" align="left">
     </td>
  </tr>
  <tr>
    <td width="32%" align="left"><font class="NArialL">Billing Address</font></td>
    <td width="30%" align="left" class='bodytext'><nested:write property="billingAddress"/></td>
    <td width="11%" align="left"></td>
    <td width="22%" align="left"><font class="NArialL">Shipping Address</font></td>
    <td width="36%" align="left" class='bodytext'><nested:write property="shippingAddress" /></td>
  </tr>

  <tr>
    <td width="32%" align="left"><font class="NArialL">Contact</font></td>
    <td width="30%" align="left" class='bodytext'><nested:write property="contact" /></td>
    <td width="11%" align="left"></td>
    <td width="22%" align="left"><font class="NArialL">Email</font></td>
    <td width="36%" align="left" class='bodytext'><nested:write property="email" /></td>
  </tr>

  <tr>
    <td width="32%" align="left"><font class="NArialL">Phone</font></td>
    <td width="30%" align="left" class='bodytext'><nested:write property="phone" /></td>
    <td width="11%" align="left"></td>
    <td width="22%" align="left"><font class="NArialL">Fax</font></td>
    <td width="36%" align="left" class='bodytext'><nested:write property="fax"/></td>
  </tr>

  <tr>
    <td width="32%" align="left"><font class="NArialL">Terms</font></td>
    <td width="30%" align="left" class='bodytext'><nested:write property="terms" /></td>
    <td width="11%" align="left"></td>
    <td width="22%" align="left"><font class="NArialL">FOB</font></td>
    <td width="36%" align="left" class='bodytext'><nested:write property="fob" /></td>
  </tr>

  <tr>
    <td width="32%" align="left"><font class="NArialL">Ship Via</font></td>
    <td width="30%" align="left" class='bodytext'><nested:write property="shipVia" /></td>
    <td width="11%" align="left"></td>
    <td width="22%" align="left"></td>
    <td width="36%" align="left"></td>
  </tr>
</nested:nest>
  </table>
  </td></tr>
  <tr><td colspan=5><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>
  <tr><td colspan=5>
    <table border='0' width="70%">
    <tr><td class='NArialL'>
        <html:checkbox property="operationsHold" disabled="true"/>Operations<br>
        <font color="#FF0000"><bean:write name="approverPOForm" property="operationsHoldUser" /></font>
    </td>
    <td class='NArialL'>
        <html:checkbox property="financeHold" disabled="true"/>Finance<br>
        <font color="#FF0000"><bean:write name="approverPOForm" property="financeHoldUser" /></font>
    </td></tr>
    </table>
  </td></tr>
  <tr><td colspan=5><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>
  <tr><td>
  <table border="0" width="98%" bordercolor="#FFFFFF">
    <tr>
      <td width="17%" height="13" bgcolor="#993333" align="center"><font class="NArialL"><font color="#FFFFFF">Item</font></td>
      <td width="18%" height="13" bgcolor="#993333" align="center"><font class="NArialL"><font color="#FFFFFF">Manufacturing Part
        Number&nbsp;</font></td>
      <td width="18%" height="13" bgcolor="#993333" align="center"><font class="NArialL"><font color="#FFFFFF">Vendor Part
        No.</font></td>
      <td width="17%" height="13" bgcolor="#993333" align="center"><font class="NArialL"><font color="#FFFFFF">Request
        Date</font></td>
      <td width="17%" height="13" bgcolor="#993333" align="center"><font class="NArialL"><font color="#FFFFFF">Quantity</font></td>
      <td width="33%" height="13" bgcolor="#993333" align="center"><font class="NArialL"><font color="#FFFFFF">Cost/Unit</font></td>
      <td width="20%" height="13" bgcolor="#993333" align="center"><font class="NArialL"><font color="#FFFFFF">Amount</font></td>
    </tr>

    <logic:iterate id="purchaseOrderLineItem" name="lineItems">
    <tr>
      <td width="17%" height="19" bgcolor="#DEE1E2" class='bodytext'>

      	<bean:write name="purchaseOrderLineItem" property="item" /></td>
      <td width="18%" height="19" bgcolor="#DEE1E2" class='bodytext'>
      	<bean:write name="purchaseOrderLineItem" property="manufacturingPartNumber"  /></td>
      <td width="18%" height="19" bgcolor="#DEE1E2" class='bodytext'>
      	<bean:write name="purchaseOrderLineItem" property="vendorPartNumber" /></td>
      <td width="17%" height="19" bgcolor="#DEE1E2" class='bodytext'>
      	<bean:write name="purchaseOrderLineItem" property="requestDate"/></td>
      <td width="17%" height="19" bgcolor="#DEE1E2" class='bodytext'>
      	<bean:write name="purchaseOrderLineItem" property="quantity"/></td>
      <td width="33%" height="19" bgcolor="#DEE1E2" class='bodytext'><font class="NArialL">$</font>
      	<bean:write name="purchaseOrderLineItem" property="rate" /></td>
      <td width="20%" height="19" bgcolor="#DEE1E2" class='bodytext'><font class="NArialL">$</font>
      	<bean:write name="purchaseOrderLineItem" property="amount"/></td>
    </tr>
    </logic:iterate>
    <nested:nest property="purchaseOrder">
    <tr><td colspan='7' align="left"><div id="font1"></div></TD></TR>
    <tr>
    <td width="17%" height="18"></td>
    <td width="18%" height="18"></td>
    <td width="18%" height="18"></td>
    <td width="17%" height="18"><font class="NArialL">Total</font></td>
    <td width="17%" height="18" class='bodytext'><nested:write property="totalQuantity" /></td>
    <td width="33%" height="18"></td>
    <td width="20%" height="18" align=right class='bodytext'><nested:write property="totalAmount" /></td>
    </tr>
    </nested:nest>
  <tr><td colspan='7'><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>
  <tr><td colspan='7' class="NArialL">Comments<br>
    <html:textarea cols='63' rows='4' property="approverComments" styleClass="txfield"/>
   </td></tr>
   <tr><td colspan=7><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></td></tr>
	   <tr><td colspan=7 align=center>
	   <a href="javascript:submitPage('APPROVE');">
	   <img src="<%=chipTracContext%>/jsp/includes/images/approve.gif" border=0></a>
	   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
           <a href="javascript:submitPage('REJECT');">
	   <img src="<%=chipTracContext%>/jsp/includes/images/reject.gif" border=0></td></tr>
    </table>
  </td></tr>

</table>
<html:hidden property="purchaseOrderId" />
<input type="hidden" name="action" value="">
</html:form>



<!-- till here -->
<BR><BR><BR></TD>
<TD bgcolor="#ffffff"><IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=1></TD>
</TR>
</TABLE>

<!-- Footer starts here -->

<%@include file="/jsp/includes/footer.jsp" %>

<!-- footer end here -->

</BODY>
</HTML>
